<extend name="Public/common"/>
<block name="style">
</block>
<block name="body">
<div id="main-container" class="container-fixed">
	<div class="col-md-2">
		<!--用户中心导航-->
		<include file="User/_nav"/>
	</div>

	<div class="col-md-10">

	<div class="common_box">
		<h3>我的订单</h3>
	</div>

	<div class="common_box margin-top-10 clearfix">
		<notempty name="order_list.list">
		<table class="td-void order-tb">
			<thead>
                <tr>
                    <th>
	                    <div class="ordertime-cont">
						<div class="time-txt">近三个月订单 <i class="icon-angle-down"></i></div>
						<div class="time-list">
                            <ul>
                                <li><a href="#none" class="curr">近三个月订单</a></li>
                                <li><a href="#none">今年内订单</a></li>
                                <li><a href="#none">更早的订单</a></li>
                            </ul>
	                    </div>
						</div>
						<div class="order-detail-txt ac">订单详情</div>
					</th>
                    <th>收货人</th>
                    <th>金额</th>
                    <th>
                        <div class="deal-state-cont" id="orderState">
                            <div class="state-txt">全部状态 <i class="icon-angle-down"></i></div>
                            <div class="state-list">
                                <ul>
                                    <li>
                                        <a class="curr"><b></b>全部状态</a>
                                    </li>
                                    <li>
                                        <a><b></b>等待付款</a>
                                    </li>
                                    <li>
                                        <a href="#none"><b></b>等待收货</a>
                                    </li>
                                    <li>
                                        <a ><b></b>已完成</a>
                                    </li>
                                    <li>
                                        <a href="#none" clstag="click|keycount|orderlist|yiquxiao"><b></b>已取消</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </th>
                    <th>操作</th>
                </tr>

            </thead>
            <volist name="order_list.list" id="order">
            <tbody data-id="{$order.order_no}">
	        <tr class="sep-row"><td colspan="5"></td></tr>
            <tr class="tr-th">
                <td colspan="5">
	            <span class="dealtime">{$order.create_time|date='Y-m-d H:i',###}</span>
	            <span class="number">订单号：<a name="orderIdLinks" target="_blank" href="#">{$order.order_no}</a></span>
	            </td>
	        </tr>
	        
        	<tr class="tr-bd">
	            <td>
	            <volist name="order.products" id="products">
	            <div class="goods-box clearfix">
	                <div class="goods-item">
	                    <div class="p-img">
	                        <a href="{:U('Index/product',array('id'=>$products['id']))}" target="_blank">
	                        <img src="{$products.main_img}" title="{$products.title}" width="60" height="60">
	                        </a>
	                    </div>
	                    <div class="p-msg">
	                        <div class="p-name">
	                        	<a href="{:U('Index/product',array('id'=>$products['id']))}" class="a-link" target="_blank" title="{$products.title}">
	                        		{$products.title}
	                        	</a>
	                        	<notempty name="products.sku">
	                        	<div class="sku_box">
	                        		<foreach name="products.sku" item="sku" >
	                                 <span class="sku_li_span">{$sku}</span>  
	                                </foreach>
	                        	</div>
	                        	</notempty>
	                        </div>
	                        申请售后
	                    </div>
	                </div>
	                <div class="goods-number">
	                    x{$products.quantity}
	                </div>
	        	</div>
	        	</volist>
	            </td>
	            
	            <td rowspan="1">
	                <div class="consignee tooltip">
	                    <span class="txt">{$order.address.name}</span><b></b>
	                    <div class="prompt-01 prompt-02" style="display: none;">
	                        <div class="pc">
	                            <strong>{$order.address.name}</strong>
	                            <p>{$order.address.province} {$order.address.city} {$order.address.town} {$order.address.address}</p>
	                            <p>{$order.address.phone}</p>
	                        </div>
	                        <div class="p-arrow p-arrow-left"></div>
		                </div>
	                </div>
	            </td>
	            <td rowspan="1">
	                <div class="amount">
	                	<span>总额 ¥{$order.paid_fee}</span> <br>
	                	<span class="ftx-13">
	                	<switch name="order.pay_type">
						    <case value="onlinepay">在线支付</case>
						    <case value="balance">余额支付</case>
						    <case value="delivery">货到付款</case>
						    <default />未设置
						</switch>
	                	</span>
	                </div>
	            </td>
	            <td rowspan="1">
	                <div class="status">
	                    <span class="order-status ftx-03">
	                    <switch name="order.status">
						    <case value="1">待付款</case>
						    <case value="2">待发货</case>
						    <case value="3">已发货</case>
						    <case value="4">已收货</case>
						    <case value="5">退货中</case>
						    <case value="6">退货完成</case>
						    <case value="10">已取消</case>
						    <case value="12">已完成</case>
						    <default />待付款
						</switch>
	            	</span>
	            	<br>
	            	<if condition="$order.status eq 3">
	            		<a target="_blank" href="#" class="ftx-01 bean-tips">
	            			<i class="bean-icon"></i>+{$order.back_point}
	            		</a>
					</if>
	                <br>
	                    <a href="{:U('Muushop/User/Orders',array('action'=>'detail','id'=>$order['id'],'order_no'=>$order['order_no']))}"  target="_blank">订单详情</a>
	                </div>
	            </td>
	            <td rowspan="1">
	                <div class="operate">
	                	<switch name="order.status">
						    <case value="1">
						    	<a href="{:U('Muushop/pay/charge',array('order_no'=>$order['order_no'],'result_url'=>$result_url))}" class="btn btn-success btn-block" data-toggle="pay_order">
		                        	立即支付
								</a>
						    	<a class="btn btn-warning btn-block" data-toggle="cannel_order" data-id="{$order.id}">
	                        		取消订单
		                        </a>
		                    </case>
						    <case value="2">
						    	<if condition="($order.pay_type eq delivery)">
						    	<a class="btn btn-warning btn-block" data-toggle="cannel_order" data-id="{$order.id}">
	                        		取消订单
		                        </a>
		                    	</if>
		                    	<a>
		                        	配货中
		                        </a>
						    </case>
						    <case value="3">
						    	<a target="_blank" class="btn btn-danger btn-block" data-toggle="do_receipt" data-id={$order.id}>
						    		确认收货
						    	</a>
						    	<a class="btn btn-block" data-remote="{:U('Muushop/User/orders',array('action'=>'delivery_info','id'=>$order['id']))}" data-toggle="modal">查看物流</a>
						    </case>
						    <case value="4">
						    	<a class="btn  btn-info btn-block" href="{:U('Muushop/User/comment',array('id'=>$order['id']))}">
	                        		评价
		                        </a>
		                        
						    </case>
						    <case value="5">
							    <a href="#" class="btn btn-danger btn-block">
		                        	查看进度
								</a>
						    </case>
						    <case value="8">
						    	维权中
						    </case>
						    <case value="10">
						    	
						    </case>
						    <case value="12">
						    	<a class="">
	                        		已评价
								</a>
						    </case>
						    <default />
						</switch>
	                </div>
	            </td>
            	</tr>

            </tbody>
            </volist>
		</table>  
        <else />
            还没有订单...快去下个单喽！
        </notempty>
    </div>
    <div class="common_box margin-top-10 clearfix">
	    <div class="text-right">
	        {:getPagination($order_list['count'],20)}
	    </div>
    </div>
	</div>
</div>
</block>
<block name="script">
<script src="__JS__/common.js"></script>
<script src="__JS__/order.js"></script>
</block>